package com.atguigu.gulimall.order.service;

import com.atguigu.common.to.mq.SeckillOrderTo;
import com.atguigu.gulimall.order.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author jss
 * @email 1115750935@qq.com
 * @date 2020-05-13 20:43:07
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);
//订单确认页返回的数据
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;
//订单提交数据
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);
//

//定时关闭订单的方法
    void closeOrder(OrderEntity entity);

//按照订单号获取订单
    OrderEntity getOrderByOrderSn(String orderSn);
//获取当前订单的支付信息
    PayVo getOrderPay(String orderSn);
//订单中心需要查询的数据
    PageUtils queryPageWithItem(Map<String, Object> params);
//
    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrder);
}

